<?php
	namespace app\models\test_study;
	use yii\db\ActiveRecord;
	class orders extends ActiveRecord{//orders = 订单
		public function getcustomers(){
			//用hasOne是因为是orders对customers一对一
			return $this->hasOne(customers::className(),['id'=>'cus_id'])->asArray();
		}
	}
?>